import request from '@/utils/request'
// 查询仿真软件
export function getAppList() {
    return request({
      url: `/appEntity/getAppList`,
      method: 'post',
      //data,
    })
  }
// 查询仿真模块
export function getAppModuleListByAppId(id) {
    return request({
      url: `/appModule/getAppModuleListByAppId/${id}`,
      method: 'post',
      //data,
    })
}
// 打开Abaqus文件
export function openAbaqusFile(data) {
    return request({
      url: `/abaqus/openAbaqusFile`,
      method: 'post',
      data,
    })
}
// 开始仿真,abaqus
export function runAbaqusCommand(data) {
  console.log('仿真data',data)
    return request({
      url: `/compute/startCompute`,
      method: 'post',
      data,
      timeout: 900000,
    })
}
// 发送STP文件
export function sendStpFile() {
    return request({
      url: `/file/sendStpFile`,
      method: 'post',
      //data,
    })
}
//comsol开始仿真
export function comsolCompute(data) {
  return request({
    url: `/comsol/startCompute`,
    method: 'post',
    data,
  })
}

//comsol开始仿真
export function comsolCompute2(data) {
  return request({
    url: `/comsol/startCompute2`,
    method: 'post',
    data,
  })
}
//ansys开始仿真
export function ansysCompute(data) {
  return request({
    url: `/ansys/startCompute`,
    method: 'post',
    data,
    timeout: 900000,
  })
}

//文件上传
export function updateFile(data) {
  return request({
    url: `/file/updateFile`,
    method: 'post',
    data,
    timeout: 900000,
  })
}

/**
 * 创建子任务
 * @param {string} 
 */
export function addSubTask(data) {
	//console.log('发给后端参数',data)
	return request({
		url: `/subtask/addSubTask`,
		method: 'post',
		data
	})
}